<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
	</head>
	<body>
		<img src="" />
		<script src="plugin/base64.js"></script>
		<script type="text/javascript">
			var str = '我是一段需要处理的字符';
			// console.log(Base64.encode(str))
			// console.log(Base64.decode('5oiR5piv5LiA5q616ZyA6KaB5aSE55CG55qE5a2X56ym'))
			var encodedData = window.btoa(unescape(encodeURIComponent(str))); // 编码
			var decodedData = decodeURIComponent(escape(window.atob('5oiR5piv5LiA5q616ZyA6KaB5aSE55CG55qE5a2X56ym'))); // 解码
			console.log(encodedData, decodedData)
		</script>
	</body>
</html>
